package com.cloud.provider;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: NacosProvider
 * @Author: wl
 * @Date: 2021/11/17 14:49
 * @Description: TODO
 */
@RestController
public class NacosProvider {

    @Value("${server.port}")
    private Integer port;

    @RequestMapping("/hello")
    public String hello() {
        // 测试消费者fegin客户端的服务降级功能
        System.out.println(1/0);
        return "hello provider, server port " + port;

    }

}
